<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="java.util.*"%>
<%@page import="com.jiuqi.util.ReturnObject"%>
<%@page import="com.dss.service.ExpertService"%>
<%  response.addDateHeader("Expires", 0);response.setHeader("Pragma","no-cache"); response.setHeader("Cache-Control","no-cache");%>
<%
    request.setCharacterEncoding("UTF-8");
	String actionType = request.getParameter("actionType");
	
	ReturnObject retObj = null;
	String retInfo = "";
	if("add".equals(actionType)) {
		retObj = ExpertService.saveExpertClass(request, response, out);
		if(!retObj.errored()){
			retInfo = "新增成功!";
		}else {
			retInfo = retObj.getErrorMessage();
		}
	}else if("modify".equals(actionType)){
		retObj = ExpertService.modifyExpertClass(request, response, out);
		if(!retObj.errored()){
			retInfo = "修改成功!";
		}else {
			retInfo = retObj.getErrorMessage();
		}
	}else if("del".equals(actionType)){
		retObj = ExpertService.removeExpertClass(request, response, out);
		if(!retObj.errored()){
			retInfo = "删除成功!";
		}else {
			retInfo = retObj.getErrorMessage();
		}
	}
%>
<script>
<%
	if(retObj != null && retObj.errored()) {
%>
	    parent.showError("<%=retInfo%>");
<%
	}else{
		if("add".equals(actionType)){
%>		
		parent.showInfo("<%=retInfo%>");
<%		}else if("del".equals(actionType)){
%>		
		parent.refreshClassFrm();
<%
		}else if("modify".equals(actionType)){
%>
		parent.showInfo("<%=retInfo%>");
<%
		}	
	}
%>
</script>